package com.qsw.paper.controller.user.advisor;


import com.qsw.paper.constant.MessageConstants;
import com.qsw.paper.pojo.dto.ClassesDto;
import com.qsw.paper.pojo.dto.ClassesQueryDto;
import com.qsw.paper.result.Result;
import com.qsw.paper.service.IClassesService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author qsw
 * @since 2024-11-15
 */
@RestController("advisorClassesController")
@RequiredArgsConstructor
@RequestMapping("/user/advisor/classes")
@Slf4j
public class ClassesController {

    private final IClassesService classesService;


    /**
     * 分页查询班级
     *
     * @param queryDto dto
     * @return 分页列表
     */
    @GetMapping("/list")
    public Result<?> pageList(ClassesQueryDto queryDto) {
        log.info("导师分页查询班级:{}", queryDto);
        return Result.success(classesService.pageList(queryDto), MessageConstants.SELECT_OK);
    }


}
